// 商店相关API服务
import { http } from './http';

// 接口返回类型定义
interface ApiResponse<T> {
  code: number;
  message: string;
  data: T;
}

// 分页类型
interface Pagination {
  page: number;
  pageSize: number;
  total: number;
}

// 分页数据包装类型
interface PageResult<T> {
  pagination: Pagination;
  list: T[];
}

// 商店信息类型
interface Store {
  id: number;
  name: string;
  logo: string;
  address: string;
  phone: string;
  businessHours: string;
  [key: string]: any;
}

/**
 * 获取门店列表
 */
export const getStoreList = (params?: {
  page?: number;
  pageSize?: number;
}) => {
  return http.get<ApiResponse<PageResult<Store>>>('/app/store/list', params);
}; 